package multiThread;

// Advance JavaSE : MultiThread

public class MyThread1 {
	public static void main(String args[]) {
		Thread t = Thread.currentThread();
		System.out.println("main thread info:");
		System.out.println(t);

		System.out.println("Thread Name: " + t.getName());
		System.out.println("Thread priority: " + t.getPriority());

		t.setName("My Thread");
		t.setPriority(1);
		System.out.println(t);
		System.out.println("Thread Name: " + t.getName());
		System.out.println("Thread priority: " + t.getPriority());

		t.setPriority(Thread.MAX_PRIORITY);
		System.out.println(t);
		System.out.println("Thread Name: " + t.getName());
		System.out.println("Thread priority: " + t.getPriority());
	}
}